Subject: Post AIW5 Capabilities Exchange Proposal

From: Frank Bordonaro <[email-masked]>
Date: Thu, 28 Jul 94 10:11:42 PDT

Attached is the latest DLSw Capabilities Exchange Proposal which contains
updates for decisions made at AIW 5. Please review this and let me know
if I have missed or misstated anything. According to my notes, the RIG 
closed every item in Wayne Clark's "Current Issues" list. 

Of interest may be the lastest control vector, "SAP List Support (X'86') 
Control Vector". The RIG decided that the supported SAPs would be 
represented as a vector, where each bit indicates the support for an
individual SAP, however, the list of possible supported SAPs was not
discussed. I have made an "everything but the kitchen sink" attempt at
the definition of this vector. Please let me know if you think SAPs 
need to be added or deleted. 

Additionally, the SAP List Support CV is required. This is consistent with the 
Netbios Support CV. If the Netbios Support CV is not present, it is 
assumed Netbios is not supported. Therefore it made no sense to make the
SAP List Support CV optional, since if it was not present, then it would be 
assumed that no SAPs were supported. If the RIG feels that if the SAP List
Support CV is not present that the reciever should assume that the sender
supports all SAPs, this would be fine with me, but I personaly would prefer
to keep the assumptions made when a vector is absent consistent.
 
Happy reading.
Frank Bordonaro
cisco Systems, Inc.

===========================================================================

			    Proposal for the Format of

			    DLSw Capabilities Exchange

				  Wayne Clark
				Frank Bordonaro
			      cisco Systems, Inc.

				   27 July 94

The Data Link Switching Capabilities Exchange is formatted as a single
General Data Stream (GDS) Variable with multiple type "LT" structured
subfields. This Capabilities Exchange message is carried in an 
DLSw Switch-to-Switch Protocol control header. 

The DLSw Capabilities Exchange Request has the following overall format:

    +----+----+-----------------+
    | LL | ID | Control Vectors |
    +----+----+-----------------+

    0-1		Length, in binary, of the DLSw Capabilities Exchange
		Request GDS Variable.  The value of LL is the sum of
		the length of all fields in the GDS Variable (i.e.
		length of LL + length of ID + length of Control
		Vectors).

    2-3		GDS Id: X'F000'

    4-n		Control Vectors consisting of type LT structured subfields
		(i.e. the DLSw Capabilities Exchange Structured Subfields)

		Type LT structured subfields consist of a 1-byte length
		field (the "L"), a 1-byte type field (the "T") and
		n-bytes of data.  The length field includes itself as
		well as the structured subfield.  The structured
		subfield consists of the type field and data so the
		length is n + 2.  This imposes a length restriction of
		253 bytes on all data contained in a structured
		subfield.

		Control Vector Id Range
		-----------------------
		    Control Vector identifiers (i.e. Type) in the range
		    of X'80' through X'CF' are reserved for use by the
		    Data Link Switching standard.

		    Control Vector identifiers (i.e. Type) in the range
		    of X'D0' through X'FD' are used for vendor-specific
		    purposes.

		Control Vector Order and Continuity
		-----------------------------------
		    Since their contents can greatly affect the parsing
		    of the Capabilities Exchange GDS Variable, the
		    required control vectors must occur first and appear in 
                    the following order; Vendor Id, DLSw Version Number,
                    Initial Pacing Window, Supported SAP List. The remainder 
                    of the Control Vectors can occur in any order.

		    Control Vectors that can be repeated (i.e. MAC
		    Address List Control Vector and NetBIOS Name List
		    Control Vector) are not necessarily adjacent.
		    It is advisable, but not required, to have the
		    Exclusivity Control Vector occur prior to either of
		    the above two vectors so that the use of the
		    individual MAC addresses or NetBIOS names will be
		    known prior to parsing them.

		Run-Time Capabilities Exchange
		------------------------------
		    Capabilities Exchange normally occurs at the
		    startup of the data link switch.  However,
		    Capabilities Exchange can also periodically occur
		    at run-time.  Run-time Capabilities Exchange can
		    only consist of the following control vectors:
			1. Exclusivity CV,
			2. MAC Address List CV,
			3. NetBIOS Name List CV,

                    A run-time capabilities exchange is a replacement 
		    operation.  As such, all pertinent MAC addresses
		    and NetBIOS names must be specified in the run-time
		    exchange.

    DLSw Capabilities Exchange Structured Subfields

        +---------------------------------------------------------------+
        |   Vendor Id (X'81') Control Vector                            |
        |                                                               |
        |       The Vendor Id control vector identifies the             |
        |       manufacturer of the Data Link Switch sending the DLSw   |
        |       Capabilities Exchange.  This control vector is          |
        |       required and must be the first control vector.          |
        |                                                               |
        +---------------------------------------------------------------+

	Offset  Length  Value       Contents
	------  ------  -----       --------
	   0       1    X'05'       Length of the Vendor Id structured
				    subfield
	   1       1    X'81'       key = X'81' that identifies this as the
				    Vendor Id structured subfield
	  2-4      3                the 3-byte Organizationally Unique
				    Identifier (OUI) for the vendor

        +---------------------------------------------------------------+
        |   DLSw Version (X'82') Control Vector                         |
        |                                                               |
	|	The DLSw Version control vector identifies the		|
	|	particular version of the DLSw standard supported by	|
	|	the sending Data Link Switch.  This control vector is	|
	|	required and must follow the Vendor Id Control Vector.  |
        |                                                               |
        +---------------------------------------------------------------+

	Offset  Length  Value       Contents
	------  ------  -----       --------
	   0       1    X'04'       Length of the Version String structured
				    subfield
	   1       1    X'82'       key = X'82' that identifies this as the
				    DLSw Version structured subfield
           2       1                the hexadecimal value representing the
				    DLSw standard Version number of the
				    sending Data Link Switch.
				      X'01' - version 1 (AIW closed pages)
           3       1                the hexadecimal value representing the
                                    DLSw standard Release number of the
                                    sending Data Link Switch.
                                      X'00' - release 0 

        +---------------------------------------------------------------+
        |   Initial Pacing Window (X'83') Control Vector                |
        |                                                               |
	|	The Initial Pacing Window control vector specifies the	|
	|	initial value of the receive pacing window size for the	|
	|	sending Data Link Switch.  This control vector is	|
	|	required and must follow the DLSw Version Control       |
        |       Vector.  						|
        |                                                               |
        +---------------------------------------------------------------+
        Offset  Length  Value       Contents
        ------  ------  -----       --------
           0       1    X'04'       Length of the Initial Pacing Window
                                    structured subfield
           1       1    X'83'       key = X'83' that identifies this as the
                                    Initial Pacing Window structured subfield
          2-3      2                the pacing window size.

^L
        +---------------------------------------------------------------+
        |   SAP List Support (X'86') Control Vector                     |
        |                                                               |
        |       The SAP List Support control vector identifies support  |
        |       for SAPs by the sending Data Link Switch. Each bit in   |
        |       the SAP control vector data field represents a SAP as   |
        |       defined below. This vector is required.                 |
        |                                                               |
        |       NetBios support is determined by the "OR" of the        |
        |       NetBios Support control vector and the NetBios SAP bit  |
        |       in the SAP List Support control vector. If either       |
        |       indicates that NetBios is supported, the sending Data   |
        |       Link Switch supports NetBios.                           |
        |                                                               |
        +---------------------------------------------------------------+
 
        Offset  Length  Value       Contents
        ------  ------  -----       --------
           0       1    X'03'       Length of the SAP List Support structured
                                    subfield
           1       1    X'86'       key = X'86' that identifies this as the SAP
                                    List Support structured subfield
           2       4                Supported SAP vector -  bitwise "OR" of
                                    SAP masks for each supported SAP.
                                    <mask>                <supp sap>
                                    X'0001' - NULL SAP       X'00'
                                    X'0002' - SNA  SAP       X'04'
                                    X'0004' - SNA  Group SAP X'05'
                                    X'0008' - SNA  SAP       X'08'
                                    X'0010' - SNA  SAP       X'0C'
                                    X'0020' - Span Tree SAP  X'42'
                                    X'0040' - NetBios SAP    X'F0'
                                    X'0080' - LNM SAP        X'F4'
                                    X'0100' - LNM Group SAP  X'F5'
                                    X'0200' - RPL SAP        X'F8'
                                    X'0400' - Global SAP     X'FF'
                                    X'0800' - X'8000' Reserved

        +---------------------------------------------------------------+
        |   Version String (X'84') Control Vector                       |
        |                                                               |
        |       The Version String control vector identifies the	|
        |       particular version number of the sending Data Link	|
        |       Switch.  The format of the actual version string is	|
        |       vendor-defined.  This control vector is optional.	|
        |                                                               |
        +---------------------------------------------------------------+

	Offset  Length  Value       Contents
	------  ------  -----       --------
	   0       1    X'n'        Length of the Version String structured
				    subfield
	   1       1    X'84'       key = X'84' that identifies this as the
				    Version String structured subfield
	  2-n     n-2               the ASCII string that identifies the
				    software version for the sending DLSw.

        +---------------------------------------------------------------+
        |   NetBIOS Support (X'85') Control Vector                      |
        |                                                               |
	|	The NetBIOS Support control vector identifies support	|
	|	for the NetBIOS protocol by the sending Data Link	|
	|	Switch.  This control vector is optional.  If it is	|
	|	omitted in a DLSw Capabilities Exchange, the sending    |
	|	Data Link Switch may still support NetBios depending on |
        |       the SAP List Support control vector. See below.         |
        |                                                               |
        +---------------------------------------------------------------+

	Offset  Length  Value       Contents
	------  ------  -----       --------
	   0       1    X'03'       Length of the NetBIOS Support structured
				    subfield
	   1       1    X'85'       key = X'85' that identifies this as the
				    NetBIOS Support structured subfield
           2       1                an indicator of the support for NetBIOS
                                    by the Data Link Switch.
				    X'00'	NetBIOS is not supported by
						the sender
				    X'01'	NetBIOS is supported by the
						sender

        +---------------------------------------------------------------+
        |   TCP Sessions (X'87') Control Vector				|
        |                                                               |
	|	The TCP Sessions control vector indicates the support	|
	|	of an alternate number of TCP sessions for the Data	|
	|	Link Switching traffic.  The base implementation of	|
	|	Data Link Switching supports two TCP sessions, one for	|
	|	each direction of data traffic.				|
        |                                                               |
	|	This control vector is optional.  If it is omitted in a	|
	|	DLSw Capabilities Exchange, then two TCP sessions are	|
	|	assumed. It is further assumed that if a Data Link      |
        |       Switch can support one TCP session, it can support two  |
        |       TCP sessions.                                           |
        |                                                               |
        |       if TCP Sessions CV values agree, then                   |
        |           use the number of sessions in CapEx                 |
        |           if the number of sessions is one, then              |
        |               if IP address of this DLSw > IP address of      |
        |                  partner DLSw, then                           |
        |                   drop the TCP session for port 2065          |
        |               else                                            |
        |                   do nothing: other DLSw will drop the extra  |
        |                   TCP session                                 |
        |               endif                                           |
        |           else                                                |
        |               do nothing: use 2 TCP sessions                  |
        |           endif                                               |
        |       else                                                    |
        |           num TCP sessions disagree: use 2 TCP sessions       |
        |       endif                                                   |
        |                                                               |
        +---------------------------------------------------------------+

	Offset  Length  Value       Contents
	------  ------  -----       --------
	   0       1    X'03'       Length of the TCP Sessions structured
				    subfield
	   1       1    X'87'       key = X'87' that identifies this as the
				    TCP Sessions structured subfield
	   2       1                an indicator of the support for an
				    alternate number of TCP sessions by
				    the sending Data Link Switch.
				      X'01'	the number of TCP sessions
				      		may be brought down to one
						after Capabilities Exchange 
						is completed.
				      X'02'	the number of TCP sessions
						will remain at two for
						the duration of the DLSw
						connection.

        +---------------------------------------------------------------+
        |   Exclusivity (X'88') Control Vector				|
        |                                                               |
	|	The Exclusivity control vector identifies how the MAC	|
	|	Address List and NetBIOS Name List control vector	|
	|	data is to be interpreted.  Specifically, this control	|
	|	vector identifies whether the MAC addresses and   	|
	|	NetBIOS names are the only ones accessible via the	|
	|	sending Data Link Switch.				|
        |                                                               |
        |       If either of the above control vectors is specified and	|
	|	the Exclusivity control vector is missing, then the MAC	|
	|	addresses and/or NetBIOS names are not assumed to be	|
	|	the only ones accessible via this switch.		|
        |                                                               |
	|	If neither of the above control vectors is specified 	|
        |       and the Exclusivity control vector is present, this     |
        |       indicates that the sending Data Link Switch does not    |
        |       wish to receive any CANUREACH messages. 
        |                                                               |
        +---------------------------------------------------------------+

	Offset  Length  Value       Contents
	------  ------  -----       --------
	   0       1    X'03'       Length of the Exclusivity structured
				    subfield
	   1       1    X'88'       key = X'88' that identifies this as the
				    Exclusivity structured subfield
	   2       1                an indicator of the relationship of the
				    MAC addresses and/or NetBIOS names to
				    the sending Data Link Switch
				      X'00'	the MAC addresses and/or
						NetBIOS names specified in
						this Capabilities Exchange
						can be accessed via this 
						switch but are not the 
						exclusive set (i.e. other
						entities are accessible in
						addition to the ones specified)
				      X'01'	the MAC addresses and/or
						NetBIOS names specified in
						this Capabilities Exchange
						are the only ones accessible
						via this switch.

	+---------------------------------------------------------------+
	|   MAC	Address	List (X'89') Control Vector			|
	|								|
	|	The MAC Address List control vector identifies one or	|
	|	more MAC addresses that are accessible through the	|
	|	sending Data Link Switch.  This control vector		|
	|	specifies a single MAC address value and MAC address	|
	|	mask value to identify the MAC address or range of MAC	|
	|	addresses. MAC addresses and masks are in canonical     |
	|       in this control vector.                                |
	|								|
	|	Note: If a particular MAC address, <mac-addr>, 		|
	|	      satisfies the following algorithm, then		|
	|	      <mac-addr> is assumed to be accessible via the	|
	|	      sending Data Link Switch.				|
	|								|
	|	      <mac-addr> & <mac-addr-mask> == <mac-addr-value>	|
	|								|
	|		  where:  <mac-addr-value> is the MAC Address	|
	|					   Value specified in	|
	|					   this control vector	|
	|			  <mac-addr-mask>  is the MAC Address	|
	|					   Mask specified in	|
	|					   this control vector	|
	|								|
	|	Note: If an individual MAC Address is desired, then	|
	|	      <mac-addr-value> should be the individual MAC	|
	|	      address and <mac-addr-mask> should be		|
	|	      X'FFFFFFFFFFFF'.					|
	|								|
	|	This control vector is optional and can be repeated if	|
	|	necessary.						|
	|								|
	+---------------------------------------------------------------+

	Offset	Length	Value	    Contents
	------	------	-----	    --------
	   0	   1	X'0E'	    Length of the MAC Address List
				    structured subfield
	   1	   1	X'89'	    key	= X'89'	that identifies	this as	the
				    MAC	Address	List structured subfield
	  2-7	   6		    the	6-byte MAC Address Value,
				    <mac-addr-value> in the above formula
	  8-13     6		    the	6-byte MAC Address Mask,
				    <mac-addr-mask> in the above formula


        +---------------------------------------------------------------+
        |   NetBIOS Name List (X'8A') Control Vector                    |
        |                                                               |
        |                                                               |
	|	The NetBIOS Name List control vector identifies one or	|
	|	more NetBIOS names that are accessible through the	|
	|	sending Data Link Switch.  This control vector		|
	|	specifies a single NetBIOS name in ASCII.  However, the	|
	|	NetBIOS name can consist of "don't care" and "wildcard"	|
	|	characters to match on a number of NetBIOS names.	|
        |                                                               |
	|	If an individual character position in the NetBIOS name	|
	|	in this control vector contains a '?', then the		|
	|	corresponding character position in real NetBIOS name	|
	|	is a "don't care".  If a NetBIOS name in this control	|
	|	vector ends in '*', then the remainder of real NetBIOS	|
	|	names is a "don't care".				|
        |                                                               |
	|	All blanks or nulls at the end of NetBIOS names in this	|
	|	control vector are ignored.				|
	|								|
	|	This control vector is optional and can be repeated if	|
	|	necessary.						|
        |                                                               |
        +---------------------------------------------------------------+

	Offset  Length  Value       Contents
	------  ------  -----       --------
	   0       1    X'n'        Length of the NetBIOS Name List
				    structured subfield (maximum = X'12')
	   1       1    X'8A'       key = X'8A' that identifies this as the
				    NetBIOS Name List structured subfield
           2       1                Individual/Group Flag
                                    X'00' - Individual Netbios Name 
                                    X'01' - Group Netbios Name 
	  3-n     n-3               the NetBIOS name with possible embedded
				    '?' and terminating '*'.

There are two kinds of DLSw Capabilities Exchange Responses: positive
and negative.  A positive response is returned to the sending Data Link
Switch if there were no errors encountered in the DLSw Capabilities
Exchange Request.  A negative response is returned if there is at least
one error encountered.

A positive DLSw Capabilities Exchange Response has the following
overall format:

    +----+----+
    | LL | ID |
    +----+----+

    0-1		Length, in binary, of the DLSw Capabilities Exchange
		Response GDS Variable.  The value of LL in this case
		is X'0004'.

    2-3		GDS Id: X'F001'

The receiver of a negative DLSw Capabilities Exchange Response is
responsible for bringing down all TCP connections.
A negative DLSw Capabilities Exchange Response has the following
overall format:

    +----+----+--------+--------+
    | LL | ID | Offset | Reason |
    +----+----+--------+--------+

    0-1		Length, in binary, of the DLSw Capabilities Exchange
		Response GDS Variable.  The value of LL is the sum of
		the length of all fields in the GDS Variable (i.e.
		length of LL + length of ID + length of Offsets/Reasons).

    2-3		GDS Id: X'F002'

    4-5		Offset into the DLSw Capabilities Exchange Request of the
		error.  Offset should always point to the start of the
		GDS Variable or a specific control vector.

    6-7		Reason code that uniquely identifies the error.  Specific
		values for the reason code are:
		  X'0001'	invalid GDS length for a DLSw Capabilities
				Exchange Request.  (The value of Offset
				is ignored.)
		  X'0002'	invalid GDS id for a DLSw Capabilities
				Exchange Request.  (The value of Offset
				is ignored.)
		  X'0003'	Vendor Id control vector is missing.  (The
			        value of Offset is ignored.)
		  X'0004'	DLSw Version control vector is missing. (The
				value of Offset is ignored.)
		  X'0005'	Initial Pacing Window control vector is
				missing.  (The value of Offset is ignored.)
		  X'0006'	length of control vectors doesn't correlate
				to the length of the GDS variable
		  X'0007'	invalid control vector id
		  X'0008'	length of control vector invalid
		  X'0009'	invalid control vector data value
		  X'000A'	duplicate control vector (for non-repeating
				control vectors)
		  X'000B'	out-of-sequence control vector (for repeating
				control vector)
		  X'000C'	DLSw Supported SAP List control vector is missing. 
                                (The value of Offset is ignored.)

    Note:	Multiple Offset,Reason pairs can be returned with one
		pair for each error encountered.